package com.shuwen.gcdj.service.common;

import com.shuwen.gcdj.bean.common.response.IntegerStringKvItemResp;
import com.shuwen.gcdj.common.enums.DataLevelEnum;
import com.shuwen.gcdj.common.enums.InfoLevel;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@AllArgsConstructor
public class CommonService {

    /**
     * get all info level
     * @return List<IntegerStringKvItemResp>
     */
    public List<IntegerStringKvItemResp> getInfoLevels() {
        return InfoLevel.getKvMap(InfoLevel.INFO_LEVEL_COMMON, InfoLevel.INFO_LEVEL_SECRET, InfoLevel.INFO_LEVEL_BUSINESS);
    }

    /**
     * get all data level
     * @return List<IntegerStringKvItemResp>
     */
    public List<IntegerStringKvItemResp> getDataLevels() {
        return DataLevelEnum.getKvMap(DataLevelEnum.DATA_LEVEL_ALL, DataLevelEnum.DATA_LEVEL_ONLY_DEPT_AND_SUB_DEPT, DataLevelEnum.DATA_LEVEL_ONLY_CREATOR_SELF, DataLevelEnum.DATA_LEVEL_SELECT_DEPT);
    }
}
